#ifndef SPEECH_H
#define SPEECH_H

#include <QObject>
#include <QString>
#include <QMap>
#include <httprequest.h>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonValue>
#include <QJsonParseError>
#include <QDebug>
#include <QHostInfo>
#include <QFile>
#include <QMessageBox>
const QString baidu_tokenUrl="https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=%1&client_secret=%2";
const QString client_id="eVBizEbUoqMTSCtUsXUSr4rn";
const QString client_secret="RSGOyX0H7mu6ErcUqdbvJ02WPotfOvdM";
const QString speech_Url="http://vop.baidu.com/server_api?dev_pid=1537&cuid=%1&token=%2";
class Speech : public QObject
{
        Q_OBJECT
    public:
        explicit Speech(QObject *parent = nullptr);
        //语音识别请求函数
        QString SpeechReconition(QString fileNameAndPath);
        //解析json函数(从replyData中获取key对应的value)
        QString getJsonValue(QString key,QByteArray replyData);
    signals:

};

#endif // SPEECH_H
